﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CanDoo.Oil.Core.DTOs
{

    #region  售油配置信息

    /// <summary>
    /// 1.1.2获取售油配置信息
    /// </summary>
    public class SellingConfigInfo
    {
        public Oillist[] oilList { get; set; }
        public AdminCardlist[] adminCardList { get; set; }
    }

    /// <summary>
    /// 售油配置信息
    /// </summary>
    public class Oillist
    {
        /// <summary>
        /// 终端编号
        /// </summary>
        public string terminalId { get; set; }
        /// <summary>
        /// 门店编号
        /// </summary>
        public string id { get; set; }
        /// <summary>
        /// 油品名称
        /// </summary>
        public string oilName { get; set; }
        /// <summary>
        /// 油剩余量
        /// </summary>
        public int stock { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        public int prize { get; set; }
        /// <summary>
        /// 出油口
        /// </summary>
        public int oilPort { get; set; }
        /// <summary>
        /// 油品等级  直接中文
        /// </summary>
        public string grade { get; set; }

        /// <summary> 
        /// 油的内部编码 从int变更为string
        /// </summary>
        public string oilId { get; set; }

        /// <summary>
        /// 油品图片
        /// </summary>
        public string oilUrl { get; set; }
    }

    public class AdminCardlist
    {
        /// <summary>
        /// 内部编号  格式为long
        /// </summary>
        public long id { get; set; }
        /// <summary>
        /// 管理员卡号
        /// </summary>
        public string cardNo { get; set; }
        /// <summary>
        /// 0能用  1不能用
        /// </summary>
        public int status { get; set; }
        /// <summary>
        /// 管理员名字
        /// </summary>
        public string cardHolder { get; set; }
        /// <summary>
        /// 权限  强制给1
        /// </summary>
        public string permission { get; set; }
        /// <summary>
        /// 手机号 有可能为空
        /// </summary>
        public string phone { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string cardPwd { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public string createTime { get; set; }
        /// <summary>
        /// 上次更新时间
        /// </summary>
        public string updateTime { get; set; }
        /// <summary>
        /// 机器对应的管理员卡 卡号
        /// </summary>
        public string storeId { get; set; }
    }

    public class Waitercardlist
    {
        public int id { get; set; }
        public int cardNo { get; set; }
        public int status { get; set; }
        public string waiterName { get; set; }
        public string waiterPhone { get; set; }
        public int terminalNo { get; set; }
        public int offlineMax { get; set; }
        public string reservedPwd { get; set; }
        public int storeId { get; set; }
        public string createTime { get; set; }
        public string updateTime { get; set; }
    }

    #endregion


    #region 1.1.3取油码取油

    /// <summary>
    /// 取油码Code
    /// </summary>
    public class OilCodeCode
    {
        /// <summary>
        /// 取油码代码
        /// </summary>
        [Display(Name = "取油码代码")]
        [Required]
        public string oilCode { get; set; }

        /// <summary>
        /// 终端编号
        /// </summary>
        [Display(Name = "终端编号")]
        [Required]
        public string terminalNo { get; set; }
    }

    /// <summary>
    /// 取油码信息
    /// </summary>
    public class OilCodeInfo
    {
        /// <summary>
        /// 油的商品编码 改为string
        /// </summary>
        public string oilId { get; set; }

        /// <summary>
        /// 取油口
        /// </summary>
        public int oilPort { get; set; }

        /// <summary>
        /// 转为string
        /// </summary>
        public string storeNo { get; set; }
        /// <summary>
        /// 失效时间
        /// </summary>
        public string expireTime { get; set; }
        public string createTime { get; set; }
        /// <summary>
        /// 生效时间
        /// </summary>
        public string effectiveTime { get; set; }
        /// <summary>
        /// 内部编号
        /// </summary>
        public long id { get; set; }
        /// <summary>
        /// 取油码中油量
        /// </summary>
        public int millilitre { get; set; }
        /// <summary>
        /// 取油码,唯一索引
        /// </summary>
        [Index(IsUnique =true)]
        public string oilCode { get; set; }
        /// <summary>
        /// 转为string
        /// </summary>
        public string memberId { get; set; }
        /// <summary>
        /// 1未使用 2已使用
        /// </summary>
        public int status { get; set; }
    }

    #endregion

    /// <summary>
    /// 取油状态信息
    /// </summary>
    public class OilCodeStatus
    {
        /// <summary>
        /// 取油码 改为string
        /// </summary>
        [Required]
        [Display(Name = "取油码")]
        public string oilCode { get; set; }
        /// <summary>
        /// 交易类型 这个干嘛用的
        /// </summary>
        [Display(Name = "交易类型")]
        public int type { get; set; }
        /// <summary>
        /// 油品id 改为string
        /// </summary>
        [Required]
        [Display(Name = "油品id")]
        public string oilId { get; set; }
        /// <summary>
        /// 取油量
        /// </summary>
        [Required]
        [Display(Name = "取油量")]
        public int millilitre { get; set; }
        /// <summary>
        ///  终端号 改为string
        /// </summary>
        [Required]
        [Display(Name = "终端号")]
        public string terminalNo { get; set; }
        /// <summary>
        ///  出油口
        /// </summary>
        [Required]
        [Display(Name = "出油口")]
        [Range(1,3)]
        public int oilPort { get; set; }
        /// <summary>
        /// 取油时间
        /// </summary>
        [Required]
        [Display(Name = "取油时间")]
        public string takeOilTime { get; set; }
        /// <summary>
        /// 门店号 改为string
        /// </summary>
        [Required]
        [Display(Name = "门店号")]
        public string storeNo { get; set; }
        
        /// <summary>
        /// 金额
        /// </summary>
        [Required]
        [Display(Name = "金额")]
        public int amount { get; set; }
        /// <summary>
        /// 会员id 改为string
        /// </summary>
        [Required]
        [Display(Name = "会员id")]
        public string memberId { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        [Required]
        [Display(Name = "创建时间")]
        public string createTime { get; set; }
    }

    #region 1.1.5本店活动

    /// <summary>
    /// 店铺号
    /// </summary>
    public class StoreNoInfo
    {
        /// <summary>
        /// 店铺号
        /// </summary>
        [Required]
        public string StoreNo { get; set; }
    }

    /// <summary>
    /// 店铺活动
    /// </summary>
    public class StoreCampaign
    {
        public DateTime? createTime { get; set; }
        /// <summary>
        /// 活动资源链接
        /// </summary>
        public string eventUrl { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? beginTime { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime? endTime { get; set; }
        public long id { get; set; }
        /// <summary>
        /// 活动简介
        /// </summary>
        public string @event { get; set; }
        public string type { get; set; }
    }

    #endregion

    /// <summary>
    /// 门店介绍信息
    /// </summary>
    public class StoreIntroduction
    {

        /// <summary>
        /// 门店名称
        /// </summary>
        public string storeTitle { get; set; }
        /// <summary>
        /// 门店介绍信息
        /// </summary>
        public string introduction { get; set; }

        /// <summary>
        /// 活动图片
        /// </summary>
        public string imageUrl { get; set; }
    }

    #region 用户登录

    /// <summary>
    /// 登录信息
    /// </summary>
    public class LoginInfo
    {
        public string loginName { get; set; }
        public string password { get; set; }
    }

    /// <summary>
    /// 用户信息
    /// </summary>
    public class UserInfo
    {
        public string city { get; set; }
        public string sex { get; set; }
        public string county { get; set; }
        public string updateTime { get; set; }
        public string token { get; set; }
        public string realName { get; set; }
        public string province { get; set; }
        public string phone { get; set; }
        public string createTime { get; set; }
        public DateTime? lockTime { get; set; }
        public string street { get; set; }
        public string idcard { get; set; }
        public string loginName { get; set; }
        public DateTime? unlockTime { get; set; }
        public int idcardType { get; set; }
        public string iconUrl { get; set; }
        public string id { get; set; }
        public string email { get; set; }
    }
    #endregion

    /// <summary>
    /// 油柜信息
    /// </summary>
    public class OilTank
    {
        public int oilStock { get; set; }
        public string smallPictureUrl { get; set; }
        public string bigPictureUrl { get; set; }
        public string productionAddress { get; set; }
        public long? updateTime { get; set; }
        public int type { get; set; }
        public string manufacturer { get; set; }
        public string number { get; set; }
        public long createTime { get; set; }
        public string grade { get; set; }
        public string name { get; set; }
        public string iconUrl { get; set; }
        public int id { get; set; }
        public int retailPrice { get; set; }
        public int wholesalePrice { get; set; }
        public int mark { get; set; }
    }

}
